
// 授权类型
function authScope(authName) {
  const authScope = {
    getUserInfo: 'scope.userInfo',
    chooseAddress: 'scope.address',
    saveImageToPhotosAlbum: 'scope.writePhotosAlbum',
    saveVideoToPhotosAlbum: 'scope.writePhotosAlbum',
    startRecord: 'scope.record',
    getLocation: 'scope.userLocation',
    chooseLocation: 'scope.userLocation',
    startLocationUpdate: 'scope.userLocation',
    chooseInvoiceTitle: 'scope.invoiceTitle',
    chooseInvoice: 'scope.invoice',
    getWeRunData: 'scope.werun',
    createCameraContext: 'scope.camera'
  }
  return authScope[authName];
}
// 拉取授权
export function getAuth({ authName, success, fail, ...values }) {
  uni.getSetting({
    success: (res) => {
      console.log('================>', res);
      let name = authScope(authName);
      // if (res.authSetting) {
        
      // }
    }
  })
}

